A motor is used in various applications, but generates heat by Joule heating of a coil included in a stator, an eddy current loss and a hysteresis loss generated in a rotor core, or the like. In particular, when the power output of a motor increases, the current supplied to the motor also increases accordingly, so that the heat generation of the motor also increases. When the heat generation amount of the motor increases, since the performance of the motor degrades, the motor needs to be cooled. For example, Patent Literature 1 discloses a technology for cooling a motor by using a cooling medium such as oil.